<script src="app/controllers/sitemaps/MonitorPostedController.js"></script>
<!-- Monitor posted -->
<div class="hfr-nav container hfr-margin-auto">
	<a href="#/"><span class="ti-home"></span> Dashboard</a>
	<div class="right">
		<a href="#/site-management">Site management</a>
	</div>
</div>
<div id="hfr-monitorPosted" class="container hfr-margin-auto" ng-controller="MonitorPostedController">
	<h2 class="hfr-heading">Monitor posted <span class="number-notify" title="">{{total}}</span></h2>

	<form name="searchForm">
		<div class="row">
			<div class="col-md-10">
				<div class="row">
					<div class="col-md-3">
						<div class="form-group">
							<div class="input-group">
								<span class="label label-danger" ng-show="submitted && searchForm.startTime.$error.required">Required!</span>
								<input type="text" class="form-control" placeholder="Start Time" datepicker-popup="{{format}}" is-open="openedStartTime" 
									ng-model="startTime" name="startTime" required>
								<span class="input-group-addon ti-calendar" ng-click="openStartTime($event)"></span>
							</div>
						</div>
					</div>
					<div class="col-md-3">
						<div class="form-group">
							<div class="input-group">
								<span class="label label-danger" ng-show="submitted && searchForm.endTime.$error.required">Required!</span>
								<input type="text" class="form-control" placeholder="End Time" datepicker-popup="{{format}}" is-open="openedEndTime" 
									ng-model="endTime" name="endTime" required>
								<span class="input-group-addon ti-calendar" ng-click="openEndTime($event)"></span>
							</div>
						</div>
					</div>
					<div class="col-md-4">
						<div class="form-group">
							<div class="input-group">
								<input type="text" class="form-control" placeholder="Filter By Blog" list="listBlogs" ng-model="blogId" required>
								<span class="input-group-addon ti-folder"></span>
							</div>
						</div>
						
						<datalist id="listBlogs">
							<option ng-repeat="blog in blogs" value="{{blog.url}}">{{blog.url}}</option>
						</datalist>
					</div>
					
					<div class="col-md-2">
						<button type="submit" class="hfr-button-blue hfr-solid hfr-button-small" ng-click="search(searchForm, true)">Search</button>
					</div>
				</div>
			</div>
			<div class="col-md-1 col-md-offset-1 hfr-viewStyle">
				<span class="ti-view-list" ng-click="changeViewList()"></span>
				<span class="ti-layout-grid2" ng-click="changeViewGrid()"></span>
			</div>
		</div>
		
		<div>
			<ul class="hfr-listPosted clearafter" ng-class="{true:'hfr-gridStyle', false:''}[gridStyle]">
				<li>
					<div class="row">
						<div class="col-md-7"><strong>Title</strong></div>
						<div class="col-md-2"><strong>Created</strong></div>
					</div>
				</li>
				<li ng-repeat="postSuccess in listPostSuccess" ng-class="{true:'active', false:''}[showSocial[$index]]">
					<div class="inner">
						<a href="{{getUrl(postSuccess)}}" target="_blank" class="ti-new-window"></a>
						<div class="shareThis">
							<span class="ti-sharethis" ng-click="displayShare($index)"></span>
							<div class="social">
								<a href class="ti-facebook" ng-click="shareFacebook(postSuccess)"></a>
								<a href class="ti-google" ng-click="shareGoogle(postSuccess)"></a>
								<a href class="ti-twitter-alt" ng-click="shareTwitter(postSuccess)"></a>
								<a href class="ti-linkedin" ng-click="shareLinkedIn(postSuccess)"></a>
							</div>
						</div>
						<div class="row">
							<div class="col-md-7">
								<div class="hfr-titlePosted">{{postSuccess.title}}</div>
								<a class="hfr-subText" href>{{postSuccess.blogId}}<span class="paragraph-end"></span></a>
							</div>
							<div class="col-md-2 created">{{postSuccess.date | date:'dd-MM-yyyy'}}</div>
							<div class="col-md-3 action">
								<a class="hfr-button-blue hfr-button-small" href><span class="ti-pencil"></span> Edit</a>
								<a class="hfr-button-blue hfr-button-small" href><span class="ti-close"></span> Remove</a>
							</div>
						</div>
					</div>
				</li>
			</ul>
			<ul class="pager" ng-show="showPrev || showNext">				
				<li ng-class="{true:'active', false:'disabled'}[showPrev]" ng-click="prevPage(searchForm)"><a href="#">&larr; Previous</a></li>
				<li ng-class="{true:'active', false:'disabled'}[showNext]" ng-click="nextPage(searchForm)"><a href="#">Next &rarr;</a></li>
			</ul>
		</div>
	</form>
</div>